package com.youlu.campus.entity;

import com.youlu.campus.base.base.EntityBase;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 用户收藏商品记录
 */
@Getter
@Setter
@Document(collection = "user_like_item")
@CompoundIndexes({
        @CompoundIndex(name = "user_item_comIdx", def = "{'userId':1,'itemId':1,'appId':1,'platform':1}", unique = true)
})
public class UserLikeItem extends EntityBase {

    private String itemId;

    private String userId;

    private Integer like = 0;

    private String appId;

    private String platform;
}
